package com.powernode.spring6.bean;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class Person {

    // 注入list集合
    private List<String> names;

    // 注入set集合
    private Set<String> address;

    // 注入Map集合
    private Map<Integer,String> phones;

    // 注入属性类
    // Properties本质上也是一个Map集合
    // Properties的父类Hashtable，Hashtable实现类Map接口
    // 虽然这个也是一个Map集合，和Map集合的注入方式类似，但是不同
    // Properties中的key和value只能是String类型、
    private Properties properties;

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void setPhones(Map<Integer, String> phones) {
        this.phones = phones;
    }

    public void setNames(List<String> names) {
        this.names = names;
    }

    public void setAddress(Set<String> address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "Person{" +
                "names=" + names +
                ", address=" + address +
                ", phones=" + phones +
                ", properties=" + properties +
                '}';
    }
}
